package com.glsc.ngateway.common.api.flowable.dto.task.formData.system;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.glsc.ngateway.common.api.flowable.dto.task.formData.AbstractTaskFormDataDto;
import com.glsc.ngateway.common.api.flowable.dto.task.formData.system.domainDto.FlowFormSystemNameModifyDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Objects;

/**
 * 系统名称变更流程表单数据
 * @author zhengyr
 * @Date 2023-04-16
 */
@Data
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@EqualsAndHashCode(callSuper=true)
public class SystemNameModifyTaskFormDataDto extends AbstractTaskFormDataDto<FlowFormSystemNameModifyDto> implements Serializable {

    private static final long serialVersionUID = -5885281796369604960L;

    @Override
    public String getSystemAdminAccount() {
        return this.getFormMainData().getSystemAdminAccount();
    }

    @Override
    public String getProcessTitle() {
        return this.getFormMainData().getProcessTitle();
    }

    @Override
    public void setProcessId(String processId) {
        if(Objects.nonNull(this.getFormMainData())) {
            this.getFormMainData().setProcessId(processId);
        }
    }

    @Override
    public String getProcessId() {
        return this.getFormMainData().getProcessId();
    }

}
